package 命令模式例子;

/**
 * Created by lilei on 2016/3/22.
 *
 * client:创建命令者
 */
public class User {
    public static void main(String[] args) {
        MusicPlayer musicPlayer = new MusicPlayer();
        Command command = new PlayCommand(musicPlayer);
        Command command2 = new StopCommand(musicPlayer);
        Button button = new Button(command,command2);
        button.stop();
        button.play();

    }
}
